package pers.hwh.concurrentprogramming.test;

import java.util.Map;

/**
 *
 * @Author: Wenhao Huang
 * @Date: 2025/2/24 17:52
 * @Version: 1.0
 * @Description: 启动一个java程序需要启动多少线程
 */
public class StartJavaProgramConcurrent {
	public static void main(String[] args) {
		Map<Thread, StackTraceElement[]> threads = Thread.getAllStackTraces();
		for (Thread thread : threads.keySet()) {
			System.out.println("Thread:" + thread.getName() + "(ID=" + thread.getId() + ")");
		}
	}
}